
<h5>Select Term To Show</h5>
<select id="termSelect">
	<option value="">All Terms</option>
<?php foreach($this->otherTerms as $term): ?>
	<option value = "<?php echo $term ?>"><?php echo $term ?></option>
<?php endforeach?>
</select>
<button onclick="changeTerm()">&gt;&gt;</button>

<h3>Viewing for <?php echo $this->term?></h3>
<?php 
//sets view as form
$this->form->setAction($this->url());
echo $this->form;
?>

<script type="text/javascript">
function changeTerm()
{
	var newTerm = document.getElementById("termSelect").value;
	self.location = "<?php echo $this->url(array('controller'=>'admin','action'=>'addcourseassociation'),null,true)?>/term/"+newTerm;
}
</script>